<?php

class Application_Model_dataDAO_CartDAO extends Zend_Db_Table_Abstract implements Application_Model_dataDAOInf_CartDAOInf {
	protected $_name = "tb_sanpham";
	protected static $_instance = null;
	
	public static function getInstance() {
		if (self::$_instance == null) {
			self::$_instance = new self ();
		}
		return self::$_instance;
	}
	
	public function getAllSanPham() {
		$result = $this->fetchAll ();
		$this->getAdapter ()->closeConnection ();
		return $result;
	}
	/**
	 * @param unknown_type $id
	 */
	public function getSanPham($id) {
		$sql = $this->select ();
		$sql->where ( 'maSanPham=?', $id );
		$result = $this->fetchAll ( $sql );
		$this->getAdapter ()->closeConnection ();
		return $result;
	}

}

?>